<div class="hbox hbox-auto-xs hbox-auto-sm" ng-init="
    app.settings.asideFolded = false; 
    app.settings.asideDock = false;
  "   ng-controller="indexMainCtrl">
  <!-- main -->
  <div class="col">
    <!-- main header -->
    <div class="bg-light lter b-b wrapper-md">
      <div class="row">
        <div class="col-sm-6 col-xs-12">
          <h1 class="m-n font-thin h3 text-black">欢迎使用 IHAIBI 融合云视频管理系统</h1>
          <small class="text-muted">Welcome to IHAIBI Streaming media server</small>
        </div>
       
      </div>
    </div>
    <!-- / main header -->
    <div class="wrapper-md" ng-controller="FlotChartDemoCtrl">
          <div class="panel wrapper">
     <div class="row">
       <!-- 小方框-->
         <div class="col-md-12">
          <div class="row row-sm text-center">
            <div class="col-xs-3">
              <a href class="block panel padder-v bg-primary item">
                <span class="text-white font-thin h1 block">1</span>
                <span class="text-muted text-xs"> <a ui-sref="app.movie.program" class="small-box-footer">影视信息 <i class="fa fa-arrow-circle-right"></i></a></span>
              </a>
            </div>
            
            <div class="col-xs-3">
            <div class="icon">
              <i class="ion ion-videocamera"></i>
            </div>
             <a href class="block panel padder-v bg-info item">
                <span class="text-white font-thin h1 block">2</span>
                <span class="text-muted text-xs"> <a ui-sref="app.user.user" class="small-box-footer">用户信息 <i class="fa fa-arrow-circle-right"></i></a></span>
              </a>
            </div>
             
            <div class="col-xs-3">
              <a href class="block panel padder-v bg-info item">
                <span class="text-white font-thin h1 block">3</span>
                <span class="text-muted text-xs"><a ui-sref="app.stream.stream">直播信息<i class="fa fa-arrow-circle-right"></i></a></span>
               
              </a>
            </div>
            
            <div class="col-xs-3">
                <a href class="block panel padder-v bg-primary item">
                <span class="text-white font-thin h1 block">4</span>
                <span class="text-muted text-xs"> <a ui-sref="app.menuInfo.menuInfo" class="small-box-footer">配置信息 <i class="fa fa-arrow-circle-right"></i></a></span>
               
              </a>
            </div>
        
          </div>
        </div>

        </div>
</div>
      <!--/ 小方框--> 





<div class="panel wrapper">
    <div class="row">
       
      <div class="col-md-6">
        <!-- carousel -->
      <div ng-controller="CarouselDemoCtrl" class="panel b-a" set-ng-animate="false">
        <div class="panel-heading">
          Carousel
        </div>
        <carousel interval="myInterval">
          <slide ng-repeat="slide in slides" active="slide.active">
            <img ng-src="{{slide.image}}" class="img-full">
            <div class="carousel-caption">
              <h4>{{$index+1}}</h4>
              <p>{{slide.text}}</p>
            </div>
          </slide>
        </carousel>
        <div class="panel-footer">
          <button type="button" class="btn btn-default m-r" ng-click="addSlide()">增加幻灯片</button>
          间隔时间: <input type="number" class="form-control w-sm inline" ng-model="myInterval"> 毫秒          
        </div>
      </div>
      <!-- / carousel -->  
      </div>
      
      
      <!-- tasks -->
   <div class="col-md-6">
      <div class="panel wrapper">
        <div class="row">
          <div class="col-md-6 b-r b-light no-border-xs">
            <a href class="text-muted pull-right text-lg"><i class="icon-arrow-right"></i></a>
            <h4 class="font-thin m-t-none m-b-md text-muted">我的日志</h4>
            <div class=" m-b">
              <div class="m-b">
                <span class="label text-base bg-warning pos-rlt m-r"><i class="arrow right arrow-warning"></i> 19:30</span>
                <a href>转码</a>
              </div>
              <div class="m-b">
                <span class="label text-base bg-info pos-rlt m-r"><i class="arrow right arrow-info"></i> 12:30</span>
                <a href>文件上传</a>
              </div>
              <div class="m-b">
                <span class="label text-base bg-primary pos-rlt m-r"><i class="arrow right arrow-primary"></i> 10:30</span>
                <a href>文件压缩</a>
              </div>
              <div class="m-b">
                <span class="label text-base bg-light pos-rlt m-r"><i class="arrow right arrow-light"></i> 07:30</span>
                <a href>文件测试</a>
              </div>
            </div>
          </div>
          <div class="col-md-6">            
            <div class="row row-sm">
              <div class="col-xs-6 text-center">
                <div ui-jq="easyPieChart" ui-options="{
                    percent: 75,
                    lineWidth: 4,
                    trackColor: '{{app.color.light}}',
                    barColor: '{{app.color.primary}}',
                    scaleColor: false,
                    size: 115,
                    rotate: 90,
                    lineCap: 'butt'
                  }" class="inline m-t">
                  <div>
                    <span class="text-primary h4">75%</span>
                  </div>
                </div>
                <div class="text-muted font-bold text-xs m-t m-b">完成度</div>
              </div>
              <div class="col-xs-6 text-center">
                <div ui-jq="easyPieChart" ui-options="{
                    percent: 50,
                    lineWidth: 4,
                    trackColor: '{{app.color.light}}',
                    barColor: '{{app.color.info}}',
                    scaleColor: false,
                    size: 115,
                    rotate: 180,
                    lineCap: 'butt'
                  }" class="inline m-t">
                  <div>
                    <span class="text-info h4">50%</span>
                  </div>
                </div>
                <div class="text-muted font-bold text-xs m-t m-b">总进度</div>
              </div>
            </div>            
          </div>
        </div>
      </div>
      <!-- / tasks -->
</div>
       </div>
</div>






      <!-- tasks -->
      <div class="row">
        <div class="col-md-6">
          <div class="panel no-border">
            <div class="panel-heading wrapper b-b b-light">
              
              <h4 class="font-thin m-t-none m-b-none text-muted">直播流列表</h4>              
            </div>
            <ul class="list-group list-group-lg m-b-none" ng-repeat="x in records">
            
              <li class="list-group-item">
                <a href class="thumb-sm m-r">
                  <i class="fa fa-refresh fa-lg fa-spin"></i>
                </a>
               <span class="pull-right "><a class="btn btn-rounded btn-sm btn-primary" ng-click="preview();">查看</a></span>
                <a href>{{x.Liu}}</a>
              </li>
             
               
            </ul>
           
          </div>
        </div>
        <div class="col-md-6">
          <div class="panel no-border">
            <div class="panel-heading wrapper b-b b-light">
             
              <h4 class="font-thin m-t-none m-b-none text-muted">频道列表</h4>              
            </div>
            <ul class="list-group list-group-lg m-b-none"  ng-repeat="x in records">
              <li class="list-group-item">
                <a href class="thumb-sm m-r">
                   
                   <i class=" fa-lg icon-camcorder"></i>
                </a>
                 <span class="pull-right"><a class="btn btn-rounded btn-sm btn-success" ng-click="preview({{x.Id}});">查看</a></span>
                <a href>{{x.ChannelName}}</a>
              </li>
              
            </ul>
           
          </div>
        </div>
      </div>
      <!-- / tasks   -->
    </div>
  </div>
  <!-- / main -->
  


          <div id ="ckplayer" style="display: none;">
              <nav ui-nav class="navi" ng-include="'src/app/play/player.html'"></nav>
          </div>
</div>

</div>



<script type="text/javascript">


//angularjs总控制器
app.controller('indexMainCtrl', function($scope, $http,$state) {
  $scope.preview=function(id){
    var playerMsg = 'type:channel,id:'+id;
    $('#playerMsg').val(playerMsg);
  
   console.log($('#playerMsg').val());

    top.layer.open({
        type: 1,
        title: '',
        fix: false,
        shadeClose: false,
        anim: 4,
        move: true,
        area: ['600px', '400px'],
        content: $('#ckplayer')
       
      });
   }


    var url =  API_URL + "channel_info?query=delflag:0&limit=5&offset=0"    

    $http.get(url).success(function (response) {
    $scope.records = response ;

    });
   

});







</script>